package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.ShopSaleMapper;
import com.ruoyi.business.domain.ShopSale;
import com.ruoyi.business.service.IShopSaleService;

/**
 * 商铺出售Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-12
 */
@Service
public class ShopSaleServiceImpl implements IShopSaleService 
{
    @Autowired
    private ShopSaleMapper shopSaleMapper;

    /**
     * 查询商铺出售
     * 
     * @param id 商铺出售主键
     * @return 商铺出售
     */
    @Override
    public ShopSale selectShopSaleById(Long id)
    {
        return shopSaleMapper.selectShopSaleById(id);
    }

    /**
     * 查询商铺出售列表
     * 
     * @param shopSale 商铺出售
     * @return 商铺出售
     */
    @Override
    public List<ShopSale> selectShopSaleList(ShopSale shopSale)
    {
        return shopSaleMapper.selectShopSaleList(shopSale);
    }

    /**
     * 新增商铺出售
     * 
     * @param shopSale 商铺出售
     * @return 结果
     */
    @Override
    public int insertShopSale(ShopSale shopSale)
    {
        shopSale.setCreateTime(DateUtils.getNowDate());
        return shopSaleMapper.insertShopSale(shopSale);
    }

    /**
     * 修改商铺出售
     * 
     * @param shopSale 商铺出售
     * @return 结果
     */
    @Override
    public int updateShopSale(ShopSale shopSale)
    {
        shopSale.setUpdateTime(DateUtils.getNowDate());
        return shopSaleMapper.updateShopSale(shopSale);
    }

    /**
     * 批量删除商铺出售
     * 
     * @param ids 需要删除的商铺出售主键
     * @return 结果
     */
    @Override
    public int deleteShopSaleByIds(Long[] ids)
    {
        return shopSaleMapper.deleteShopSaleByIds(ids);
    }

    /**
     * 删除商铺出售信息
     * 
     * @param id 商铺出售主键
     * @return 结果
     */
    @Override
    public int deleteShopSaleById(Long id)
    {
        return shopSaleMapper.deleteShopSaleById(id);
    }
}
